import os
from model import init_table
from x_com import xport_core

logger = xport_core.getLogger()


async def create_db():
    # 数据库文件不存在时创建
    if os.path.exists("./user.db"):
        return
    
    async with SERVICE.engine.connect() as conn:
        await init_table(conn)
